<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        <input type="checkbox" id="agree" v-model="isAgree">同意协议
        <h2>您选择的是{{isAgree}}</h2>
        <button v-bind:disabled="!isAgree">下一步</button>

        <!-- chekcbox多选框  把选中的选项收集起来 --><br>
        <label>
            <input type="checkbox" value="玩游戏" v-model="hobbies">玩游戏
            <input type="checkbox" value="吃饭" v-model="hobbies">吃饭
            <input type="checkbox" value="我的世界" v-model="hobbies">我的世界
            <input type="checkbox" value="第九大陆" v-model="hobbies">第九大陆
        </label>

        <br>
        <h2>您的爱好是：{{hobbies}}</h2>

        <!-- input值动态绑定 -->
        <label v-for="item in hobbies">
            <input type="checkbox" value="item" v-model="item">{{item}}
        </label>

    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: '我是你爹!',
                isAgree: false,
                hobbies: [],
            },
            methods: {

            }
        });
    </script>
</body>

</html>